import java.util.ArrayList;
import java.util.List;

/**
 * @Author Big_white
 * @Date 2021/11/10
 */
public class University extends OrganizationComponent{

    //存放College
    List<OrganizationComponent> organizationComponents=new ArrayList<OrganizationComponent>();

    public University(String name, String des) {
        super(name, des);
    }

    //重写add
    @Override
    protected void add(OrganizationComponent organizationComponent) {
        organizationComponents.add(organizationComponent);
    }

    //重写remove方法


    @Override
    protected void remove(OrganizationComponent organizationComponent) {
        organizationComponents.remove(organizationComponent);
    }

    @Override
    public String getName() {
        return super.getName();
    }


    @Override
    public String getDes() {
        return super.getDes();
    }

    //就是输出University中包含的学院
    @Override
    protected void print() {
        System.out.println("========="+ getName() +"================");
        for (OrganizationComponent organizationComponent:organizationComponents){
            organizationComponent.print();
        }
    }
}
